package edu.vt.ece_3574.amber_alert.messaging;

import android.telephony.SmsManager;

/**
 * This is a class to handle sending text messages
 * 
 * @author acorvin
 */
public class MessagingUtils {
	/** Static singleton instance of this class */
	private static MessagingUtils instance = new MessagingUtils();
	
	private MessagingUtils() {
	}
	
	/**
	 * Get the singleton static instance of this class
	 * 
	 * @return the MessagingUtils object
	 */
	public static MessagingUtils get() {
		return instance;
	}
	
	/**
	 * Send an SMS with the specified message to the specified number
	 * @param destinationNumber the number to send the SMS to
	 * @param message the text to send in the message
	 */
	public void sendSMS(String destinationNumber, String message) {
		//Get the default SmsManager
		SmsManager sms = SmsManager.getDefault();
		//Send the message to the specified number
		sms.sendTextMessage(destinationNumber, null, message, null, null);
	}
}
